<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">文档下载</a></li>
        <li><a href="{:url('AdminDocument/document_add')}">添加文档</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('AdminDocument/index')}">
        分类:
        <select class="form-control" name="category" style="width: 140px;">
            <option value='0'>全部</option>
            <foreach name="category" id="vo">
            <option value='{$vo.id}' {$cate_id==$vo.id?'selected="selected"':''}>{$vo.category}</option>
            </foreach>
        </select> &nbsp;&nbsp;
        <!--时间:-->
        <!--<input type="text" class="form-control js-bootstrap-datetime" name="start_time"-->
               <!--value="{$start_time|default=''}"-->
               <!--style="width: 140px;" autocomplete="off">- -->
        <!--<input type="text" class="form-control js-bootstrap-datetime" name="end_time"-->
               <!--value="{$end_time|default=''}"-->
               <!--style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;-->
        关键字:
        <input type="text" class="form-control" name="keyword" style="width: 200px;"
               value="{$keyword|default=''}" placeholder="请输入关键字...">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('AdminDocument/index')}">清空</a>
    </form>

        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="50">ID</th>
                <th>标题</th>
                <th>分类</th>
                <th>简介</th>
                <th>文件</th>
                <th>视频</th>
                <th width="50">上传者</th>
                <!--<th width="65">下载量</th>-->
                <th width="160">更新时间</th>
                <th width="160">发布时间</th>
                <th width="95">操作</th>
            </tr>
            </thead>

            <foreach name="data" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.title}</td>
                    <td>{$vo.categories.category}</td>
                    <td>{$vo.desc}</td>
                    <td><foreach name="$vo.file_names" item="v" key="k"><a href="/upload/{$vo.file_urls[$k]}" target="_blank">《{$v}》</a><br></foreach></td>
                    <td><a href="/upload/{$vo.post.more.video}" target="_blank">《{$vo.post.more.video|default='无'}》</a><br></td>
                    <td>{$vo.user.user_nickname}</td>
                    <!--<td>1</td>-->
                    <td>{$vo.update_time|date="Y-m-d H:i"}</td>
                    <td>{$vo.ctime|date="Y-m-d H:i"}</td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('AdminDocument/document_edit',['id'=>$vo.id])}">编辑</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('AdminDocument/document_del',['id'=>$vo.id])}">删除</a>
                    </td>
                </tr>
            </foreach>
        </table>
    <ul class="pagination">{$page|default=''}</ul>

</div>
<script src="__STATIC__/js/admin.js"></script>
<script>

    function reloadPage(win) {
        win.location.reload();
    }


</script>
</body>
</html>